var form;
var table;
layui.use(['form','table'],function(){
    form = layui.form;
    table=layui.table;

    //课程分类下拉菜单
    selCourseClassSelect();
    function selCourseClassSelect(){
        $.ajax({
            url: "/SyOperationController/selCourseClassSelect",
            type: "get",
            dataType: "json",
            success: function (data) {
                for(var a=0;a<data.data.length;a++){
                    $("#course_cstatus").append("<option value='"+data.data[a].id+"'>"+data.data[a].name+"</option>");
                }
                form.render();
            }
        });
    }

});

//确定查询
function selSuper() {
    var course_name=$("#course_name").val();
    var course_cstatus=$("#course_cstatus option:selected").val();

    parent.$("#courseName").val(course_name);
    parent.$("#course_cstatus").val(course_cstatus);

    parent.selCourse();


    //点击检索之后清空父子的输入框
    $("input").val("");
    $(this).find("option:selected").removeAttr("selected");

    parent.$("input").val("");
    parent.$(this).find("option:selected").removeAttr("selected");
    var layer_1=parent.layer_1;
    layer_1.close(layer_1.index);

};
//重置
function chongzhi(){
    $("input").val("");
    $(this).find("option:selected").removeAttr("selected");
}
